<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
<style>
    div{
        height: 200px;
        width: 200px;
    }
    .b1{
        background-color:yellow;
        position: relative;
        top: 100px;
        left: 100px;
        
        /*设置层级*/
        z-index: 1;
    }
    .b2{
        background:red;
        position: relative;
    }
</style>
</head>
<body>
    <div class="b1"></div>
    <div class="b2"></div>
</body>
</html>